package com.ibeeking.found.cop.service.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @ClassName  DataTalkViewItemVO
 * @Description 聊天记录数据表
 * @Author ibeeking
 * @Date 2021-01-15 10:44
 **/
@Data
public class DataTalkViewItemVO implements Serializable {
    private static final long serialVersionUID = -1L;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 消息id
     */
    private Long msgSeq;

    /**
     * 消息id
     */
    private String msgId;

    /**
     * 消息发送方id。同一企业内容为userid，非相同企业为external_userid。消息如果是机器人发出，也为external_userid
     */
    private String code;
    private String name;
    private String nickName;
    private String avatar;
    /**
     * 群聊消息的群id。如果是单聊则为空
     */
    private String roomId;
    /**
     * 群聊名称
     */
    private String roomName;
    /**
     * 群消息发送时间戳
     */
    private String msgTime;

    /**
     * 文本消息为：text。String类型
     */
    private String msgType;
    /**
     * 展示用，left/right
     */
    private String side;
    /**
     * 消息撤回标志
     */
    private Integer isRevoke;
    /**
     * 群邀请
     */
    private String invite;
    /**
     * 群邀请
     */
    private String msgText;

    /**
     * 创建时间
     */
    private String createTime;
    /**
     * 文件
     */
    private File file;
    /**
     * 位置
     */
    private Location location;

    @Getter
    @Setter
    public static class File implements Serializable {
        private static final long serialVersionUID = -1L;

        private String fileType;

        private String fileName;

        private String fileRealName;

        private String filePath;

        private String fileExt;

        private Integer fileSize;

        private Long playLength;
    }

    @Getter
    @Setter
    public static class Location implements Serializable {
        private static final long serialVersionUID = -1L;

        private Double longitude;

        private Double latitude;

        private String address;

        private String title;

        private Integer zoom;
    }

}
